home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / misc / amigem.lha / amigem / io / init.c
Encoding:
C/C++ Source or Header  |  1994-12-24  |  722 b   |  45 lines

  1. #define DEV_VERSION    1
  2. #define DEV_ID        "$VER: io.device 1.0 (24.12.94)\0xa\0xd"
  3.  
  4. /* Choke if called from CLI */
  5. int FirstAddress(void)
  6. { return -1; }
  7.  
  8. static const struct Resident initDDescrip=
  9. {
  10.   RTC_MATCHWORD,
  11.   &initDDescrip,
  12.   &EndCode,
  13.   RTF_AUTOINIT,
  14.   DEV_VERSION,
  15.   NT_DEVICE,
  16.   0,
  17.   "io.device",
  18.   &DEV_ID[6],
  19.   &Init
  20. };
  21.  
  22. struct dev
  23. {
  24.   struct Device Device;
  25.   struct ExecBase *SysBase;
  26.   BPTR SegList;
  27. };
  28.  
  29. #define SysBase XIOBase->SysBase
  30.  
  31. const APTR Init[4]=
  32. {
  33.   (APTR)sizeof(struct dev),
  34.   funcTable,
  35.   dataTable,
  36.   &IO_Init
  37. };
  38.  
  39. FC3(struct Device *,IO_Init,struct dev *XIOBase,D0,BPTR segList,A0,struct Library *sysBase,A6)
  40. {
  41.   SysBase=sysBase; /* No need to read address 4 */
  42.   XIOBase->SegList=segList;
  43.   
  44. }
  45.